#
#  Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#        http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#

{% for key,value in synapse_properties.items() %}
{{key}}={{value}}
{% endfor %}
{% if apim.sync_runtime_artifacts.gateway is defined %}
{% if synapse_properties['synapse.artifacts.file.storage.enabled'] is not defined %}
synapse.artifacts.file.storage.enabled=false
{% endif %}
{% endif %}
{% if apim.mediator_config.oauth.enable_retry_call_with_new_token %}
{% if apim.mediator_config.oauth.connection_timeout_duration is defined %}
synapse.endpoint.http.oauth.token.endpoint.global.connection.timeout={{apim.mediator_config.oauth.connection_timeout_duration}}
{% endif %}
{% if apim.mediator_config.oauth.connection_request_timeout_duration is defined %}
synapse.endpoint.http.oauth.token.endpoint.global.connection.request.timeout={{apim.mediator_config.oauth.connection_request_timeout_duration}}
{% endif %}
{% if apim.mediator_config.oauth.socket_timeout_duration is defined %}
synapse.endpoint.http.oauth.token.endpoint.global.socket.timeout={{apim.mediator_config.oauth.socket_timeout_duration}}
{% endif %}
{% if apim.redis_config is defined %}
token.cache.class=org.wso2.carbon.apimgt.gateway.mediators.oauth.RedisTokenCache
{% endif %}
{% if apim.proxy_config is defined && apim.proxy_config.enable %}
synapse.endpoint.http.oauth.token.endpoint.global.proxy.enabled=true
synapse.endpoint.http.oauth.token.endpoint.global.proxy.host={{apim.proxy_config.host}}
synapse.endpoint.http.oauth.token.endpoint.global.proxy.port={{apim.proxy_config.port}}
synapse.endpoint.http.oauth.token.endpoint.global.proxy.username={{apim.proxy_config.username}}
synapse.endpoint.http.oauth.token.endpoint.global.proxy.password={{apim.proxy_config.password}}
synapse.endpoint.http.oauth.token.endpoint.global.proxy.protocol={{apim.proxy_config.protocol}}
{% endif %}
{% if apim.mediator_config.oauth.trust_store.location is defined %}
synapse.endpoint.http.oauth.token.endpoint.trust.store.location={{apim.mediator_config.oauth.trust_store.location}}
{% endif %}
{% if apim.mediator_config.oauth.trust_store.type is defined %}
synapse.endpoint.http.oauth.token.endpoint.trust.store.type={{apim.mediator_config.oauth.trust_store.type}}
{% endif %}
{% if apim.mediator_config.oauth.trust_store.password is defined %}
synapse.endpoint.http.oauth.token.endpoint.trust.store.password={{apim.mediator_config.oauth.trust_store.password}}
{% endif %}
{% endif %}
